!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! define global variable used in other subroutine
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! coded by : B. G.
! created  : 2015-06-16
! revised  :
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! nomenclature:
!   Tt     total temperature, K
!   Pt     total presure, Pa
!   g      specific heat ratio, gamma
!   Rg     gas constant, 287.05 .....
!   p0     freestream pressure, Pa
!   yt     throat height, m
!   rtu    throat upstream arc radius, m
!   rtd    throat downstream arc radius, m
!   xb,yb  point B location, m
!   thetab point B slope angle, rad
!   thetae exit lip point slope
!   xe,ye  exit lip point axial and radical location
!   Me     exit lip point Mach number
!   xed	  exit lip point design axial location
!   el     location tolerance, m
!   ev     velocity tolerance, m/s
!   pi     3.1415....
!   wallflag  1-upside wall, -1-downside wall
!   flagy40   1-y40<0.0, 0-y4>=0.0
!   delta  0-planar flow, 1-axisymmetrical flow
!   Ny     throat height equalized spaced point number, odd
!   Ni,Nj  calculate point number
!   x,y    point location
!   Vu,Vv  point velocity properties 
!   V      velocity
!   p      pressure
!   T      temperature
!   rou    density
!   M      Mach number
!   mdot   mass flow rate
!   mdot1d 1-dimensional mass flow rate
!   Fexit  thrust of nozzle exit
!   Fs     thrust with p0=0
!   F1d	  1-dimensional thrust
!   Isp	  specific impulse
!   Isp1d  1-dimensional specific impulse
!   CDm    mdot/mdot1d
!   etaF   Fexit/F1d
!   etaI   Fexit/F1d
!   Ct     thrust coefficient, Fexit/(pi*yt**2*p(t))
!   Ctm	  maximum thrust coefficient, g*((g+1)/2)**(-g/(g-1))*sqrt((g+1)/(g-1))
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

module VariableDef
   implicit none
   real*8::Tt,Pt,g,Rg,p0
   real*8::yt,rtu,rtd,xb,yb,thetab,thetae,xe,ye,Me,xed
   real*8::el,ev,pi
   integer::wallflag,flagy40,delta,Ny,Ni,Nj
   real*8::x1,y1,Vu1,Vv1,x2,y2,Vu2,Vv2,x3,y3,Vu3,Vv3,x4,y4,Vu4,Vv4,V4,p4,T4,rou4,M4
   real*8::mdot,mdot1d,Fexit,Fs,F1d,Isp,Isp1d,CDm,etaF,etaI,Ct,Ctm
end module VariableDef
